//哈希表类
#ifndef HASH_h
#define HASH_h

#include <iostream>
#include <fstream>
#include <string>

using std::string;

typedef struct
{
	string id, name, address;
}record;

int hashsize[] = {43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97};

class hash 
{
private:
	int count;
	int size_index;
	int list_size;

public:
	record *elem;
	hash();
	void init();
	int get_hash(string);
	int search(string, int &, int &);
	int insert(record);
	void recreate();
};

#endif